package com.echo.yixiaowu.main

import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp

@Deprecated("当前方法已废弃，请使用XiaowuRow")
@Composable
fun SecondMenu(
    mStickyHeaderMenuTopPadding: Dp, mStickyHeaderMenuShape: Dp, mStickyHeaderHeight: Dp
) {
    Box(
        modifier = Modifier
            .fillMaxWidth()
            .padding(top = mStickyHeaderMenuTopPadding)
            .clip(
                RoundedCornerShape(
                    topStart = mStickyHeaderMenuShape, topEnd = mStickyHeaderMenuShape
                )
            )
            .background(color = Color.White)
            .border( // 添加底部边框
                width = 1.dp,
                color = Color.LightGray.copy(alpha = 0.3f),
                shape = RoundedCornerShape( // 仅底部不圆角
                    topStart = mStickyHeaderMenuShape,
                    topEnd = mStickyHeaderMenuShape,
                    bottomStart = 0.dp,
                    bottomEnd = 0.dp
                )
            )
    ) {
        LazyRow(
            modifier = Modifier.height(mStickyHeaderHeight),
            horizontalArrangement = Arrangement.spacedBy(16.dp),
            contentPadding = PaddingValues(horizontal = 16.dp),
            verticalAlignment = Alignment.CenterVertically
        ) {
            items(9) { index ->
                Text(
                    text = "title ${index + 1}", color = Color.Gray, fontWeight = FontWeight.Bold
                )
            }
        }
    }
}